package com.sensePlusVR.utils;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.sensePlusVR.bean.GameItem;
import com.sensePlusVR.main.VrRealActivity;

public class GameController {
	private static String TAG="GameController";
	private static List<String> mGameList;
	private static int mGameMode;
	private static boolean mIsRealGame = false;
	private static GameItem mGameItem;
	public static void GameStart(Context ctx, int gameMode, boolean isRealGame,List<String> gameList,GameItem gameItem){ 
		
		if(isRealGame){
			
			PageJumpUtil.JumpToRealGame(ctx, VrRealActivity.class, gameMode == Constant.GAME_MODE_VR,gameList,gameItem);
			
		}
		
	
	}
	
	public static void GameSetList(int mode, boolean isRealGame,List<String> gameList,GameItem gameItem){
		
		mGameList = gameList;
		mGameMode = mode;
		mIsRealGame = isRealGame;
		mGameItem = gameItem;
		
	}
	
	public static void GameStart(Context ctx){
		if (mGameList != null && !mGameList.isEmpty())
			GameStart(ctx, mGameMode, mIsRealGame,mGameList,mGameItem);
	}
	
	
	
	public static boolean getRealGame(){
		return mIsRealGame;
	}
	
	public static GameItem getGameItem(){
		return mGameItem;
	}
	
	/**
	 * 获取游戏模式
	 * @return
	 */
	public static int getGameMode(){
		
		return mGameMode;
	}
	
	public static void GameStartOne(Context ctx, int gameMode, boolean isRealGame,String game,GameItem gameItem){
		List<String> gameList = new ArrayList<String>();
		gameList.add(game);
		MyLog.e(TAG, "game="+game.toString());
		
		if(isRealGame){
			
			PageJumpUtil.JumpToRealGame(ctx, VrRealActivity.class, gameMode == Constant.GAME_MODE_VR,gameList,gameItem);
			
		}
		

	}
}
